# -*- coding: utf-8 -*-
# @Time : 2024/3/13 9:32
# @Author : ZH
# @File : 2864.py
# @Software: PyCharm
class Solution(object):
    def maximumOddBinaryNumber(self, s):
        """
        :type s: str
        :rtype: str
        """
        if len(s) < 2: return s
        one_num = 0
        two_num = 0
        for i in s:
            if i == '0':
                one_num += 1
            else:
                two_num += 1
        if two_num >= 2:
            return '1'*(two_num-1)+'0'*one_num + '1'
        else:
            return '0' * one_num + '1'*two_num



if __name__ == '__main__':
    so = Solution()
    l = so.maximumOddBinaryNumber(s='010')
    print(l)
